
import React from 'react'
import PropTypes from "prop-types";
import "./Button.css";
export default function Button(props) {
  Button.prototype = {
    name: PropTypes.string,
    orange: PropTypes.bool,
    wide: PropTypes.bool,
    clickHandler: PropTypes.func,
  }
  const className = [
    "component-button",
    props.orange ? "orange" : "",
    props.wide ? "wide" : "",

  ]
  const handleClick = () => {
    props.clickHandler(props.name)
  }
  return (
    <div className={className.join(' ').trim()}>
      <button onClick={handleClick}>{props.name}</button>
    </div>
  )
}
